<%@page isELIgnored="false" pageEncoding="UTF-8" contentType="text/html; UTF-8" %>

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/layui/css/layui.css">
	<script src="${pageContext.request.contextPath}/js/jquery-1.12.4.js"></script>
	<script src="${pageContext.request.contextPath}/js/ajaxfileupload.js"></script>
	<script src="${pageContext.request.contextPath}/layui/layui.all.js"  charset="utf-8"></script>
	<style type="text/css">
		.layui-table-cell {
			height: auto;
			line-height: 28px;
		}
	</style>
</head>
<body>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
	<legend>拖拽上传</legend>
</fieldset>
<div class="layui-upload-drag" id="test10">
	<i class="layui-icon"></i>
	<p>点击上传,或将文件拖拽到此处</p>
</div>
<script>
	layui.use('upload',function(){
	    var $=layui.jquery,
			upload=layui.upload;
	    //拖拽上传
		upload.render({
			elem:'#test10',
			accept:'file',
			url:"${pageContext.request.contextPath}/importExcel",
			done:function(res){
			    console.log(res);
			}
		});
	})
</script>

</body>
</html>
